package edu.sctu.wangxiaoqiang.day20150607.timer;

/**
 * Created by user25 on 2015/6/7.
 */
public class SetTimer {
    public int time;
    public SetTimer(int time){
    this.time = time;
    }

  public void thread(int num,long stoptime){
     new Thread(){
         @Override
     public void run(){
             super.run();
        for (int i=0;i<=num;i++){
            System.out.println(i);
            try {
               Thread.sleep(stoptime);
            }catch (InterruptedException e){
                e.printStackTrace();
            }
        }
         }
     }.start();

  }
}
